<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>

    <script type="text/javascript" src="../webapp/extjs/ext-debug.js"></script>
<head>
    <title>GWU Group Project - Email Contact</title>
</head>
<body>

<h2>Email Contact</h2>

<table class="data">
<tr>
    <td><b>Name:</b></td>
    <td>${contact.lastName}, ${contact.firstName}</td>
</tr>
<tr>
    <td><b>Email:</b></td>
    <td>${contact.email}</td>
</tr>
<tr>
    <td><b>Phone:</b></td>
    <td>${contact.phone}</td>
</tr>
</table>


<form:form id="emailForm" method="post" action="sendEmail.html" commandName="emailUser">

<input type="hidden" id="userId" name="userId" value="${contact.id}">

    <table>
	    <tr>
	        <td><form:label path="subject">Subject</form:label></td>
	    </tr>
	    <tr>
	        <td><form:input size="41" path="subject" /></td>
	    </tr>	    
	    <tr>
	        <td><form:label path="message">Message</form:label></td>
	    </tr>
	    <tr>
	    	<td><textarea rows="10" cols="30" id="message" name="message" form="emailForm"></textarea></td>
	     </tr>      
	     <td colspan="2">
            <input type="submit" value="Send Email"/>
        </td>
        <td>
            <form><input Type="button" value="Cancel" onClick="history.go(-1);return true;"></form>
        </td>
	</table> 
</form:form>
 
</body>
</html>